﻿namespace OpenComposite.Inbox.Attachments
{
	using System;
	using System.Collections.Generic;
	using System.ComponentModel;
	using System.Data;
	using System.Drawing;
	using System.Text;
	using System.Windows.Forms;

	/// <summary>
	/// Attachment description input form.
	/// </summary>
	partial class FormAttachmentDesc : Form
	{
		#region Initialization

		/// <summary>
		/// Initializes a new instance of the <see cref="FormAttachmentDesc"/> class.
		/// </summary>
		public FormAttachmentDesc()
		{
			InitializeComponent();
		}

		#endregion Initialization

		#region Public Members

		#region Properties

		/// <summary>
		/// Gets or sets the name of the attachment file.
		/// </summary>
		/// <value>The name of the attachment file.</value>
		public string AttachmentFileName
		{
			get { return txtFileName.Text; }
			set { txtFileName.Text = value; }
		}

		/// <summary>
		/// Gets or sets the attachment description.
		/// </summary>
		/// <value>The description of the attachment.</value>
		public string Description
		{
			get { return txtDescription.Text.Trim(); }
			set { txtDescription.Text = value; }
		}

		#endregion Properties

		#endregion Public Members

		#region Private Members

		#region Event Handlers

		private void tsbtnCancel_Click(object sender, EventArgs e)
		{
			this.DialogResult = DialogResult.Cancel;
			this.Close();
		}

		private void tsbtnOK_Click(object sender, EventArgs e)
		{
			this.DialogResult = DialogResult.OK;
			this.Close();
		}

		#endregion Event Handlers

		#endregion Private Members
	}
}